package com.practice.service.serviceImpl;

import com.practice.dao.daoImpl.EmpDaoImpl;
import com.practice.entity.Emp;
import com.practice.service.EmpService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author:高杰领
 * @date:2021/11/18 9:42
 * @description:Emp业务层实现类
 * @version:1.0
 **/
@Service()
public class EmpServiceImpl implements EmpService {
    @Autowired
    EmpDaoImpl empDao;

    public EmpDaoImpl getEmpDao() {
        return empDao;
    }

    public void setEmpDao(EmpDaoImpl empDao) {
        this.empDao = empDao;
    }

    @Override
    public List<Emp> selectAll() {
        return empDao.selectAll();
    }

    @Override
    public boolean insertEmp(Emp emp) {
        return empDao.insertEmp(emp);
    }

    @Override
    public boolean updateEmp(Emp emp) {
        return empDao.updateEmp(emp);
    }

    @Override
    public boolean deleteEmp(int EMPNO) {
        return empDao.deleteEmp(EMPNO);
    }

    @Override
    public Emp selectOne(int EMPNO) {
        return empDao.selectOne(EMPNO);
    }

}
